package com.opennews.openplatform

import org.hibernate.cfg.ImprovedNamingStrategy
import org.hibernate.internal.util.StringHelper

class CustomNamingStrategy extends ImprovedNamingStrategy {
    /**
     * Returns the table name for an entity class.
     * @param className: The name of the domain class.
     * @return The string of the table name.
     */
    String classToTableName(String className) {
        return "op_" + StringHelper.unqualify(className)
    }
}